<br /><h3>Продолжительность</h3>
<p>

  <?php 
             
    if ( $topic['duration_enabled'] )
    {
      $request['duration'] = cleaner( $request['duration'] );
    
      print $request['duration'] ? 'Продолжительность ' . $request['duration'] . ' мин.<br />' : '';      
    }
 
    if ( ! $request['duration'] ) print '<i>Нет информации.</i>';
    
    if ( $do == 'update-duration' )  
    {
      $duration = cleaner( $_POST );  
    }
    else
    {
      $duration = $request['duration'];
    }    
    
  ?>
 
</p> 

<p><a href='javascript:void(0)' onclick='changeDisplay( "duration_form" )'>Редактировать</a> &rarr;</p>
<div style="display:none" id='duration_form'>
  <form action='' method='post'>
  
    <input type='hidden' name='do' value='update-duration'>
    
    <table>
      <?php if ( $topic['duration_enabled'] ) { ?>
      <tr>
        <td>Продолжительность</td>
        <td><input type='text' name='duration' size='3' value='<?php print $duration ?>'> мин</td> 
      </tr>      
      <?php } ?>
      <tr>
        <td colspan="2"><button style='width: 100%' type='submit'>Сохранить</button></td>
      </tr>
      
    </table>

  </form>
</div>